package com.baidu.st.fe.spllot.util;

import java.io.FileInputStream;
import java.io.IOException;
import java.nio.ByteBuffer;
import java.nio.channels.FileChannel;

public class FileUtil {
	public static String readFile(String path) throws IOException {
		String result = "";
		FileInputStream fis = new FileInputStream(path);
		FileChannel fc = fis.getChannel();
		ByteBuffer buffer = ByteBuffer.allocate(1024*1024);
		fc.read(buffer);
		byte[] b = buffer.array();
		result = new String(b);
		return result;
	}
}
